package cn.lanchengkeji.datafillingsystem.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 角色权限关联
 * </p>
 *
 * @author yixu
 * @since 2018-12-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("train_roles_privilege")
@ApiModel(value="RolesPrivilege对象", description="角色权限关联")
public class RolesPrivilege extends Model<RolesPrivilege> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "自增主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "角色ID")
    private Integer rolesId;

    @ApiModelProperty(value = "权限类型：1，菜单，2，操作")
    private Integer privilegeType;

    @ApiModelProperty(value = "关联ID")
    private Integer refId;


    public static final String ID = "id";

    public static final String ROLES_ID = "roles_id";

    public static final String PRIVILEGE_TYPE = "privilege_type";

    public static final String REF_ID = "ref_id";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
